﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo1
{

    class Demo2
    {
        //四位数
        public static void Test1()
        {
            Console.WriteLine("请输入一个四位整数:");
            int sum = Convert.ToInt32(Console.ReadLine());
            int a = sum / 1000;
            int b = sum % 1000 / 100;
            int c = sum % 100 / 10;
            int d = sum % 10;
            Console.WriteLine("千位是"+a+"百位是"+b+"十位是"+c+"个位是"+d);
            Console.ReadKey();
        }
    }
}
